<link rel='stylesheet' type='text/css' href='<?php echo $ruta; ?>/css/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='<?php echo $ruta; ?>/css/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='<?php echo $ruta;?>/js/fullcalendar.js'></script>
<script type='text/javascript'>
    $(document).ready(function() {          
        $('#jMonthCalendar').fullCalendar({
            editable: true,
            firstDay: 1,
            tarifas: '<?php echo json_encode($info_tarifas);?>',
            disableDragging: true,
            aspectRatio: 2.75,
            dayNames: ['<?php echo lang('domingo');?>', '<?php echo lang('lunes');?>', '<?php echo lang('martes');?>', '<?php echo lang('miercoles');?>',
                '<?php echo lang('jueves');?>', '<?php echo lang('viernes');?>', '<?php echo lang('sabado');?>', '<?php echo lang('domingo');?>'],
            dayNamesShort: ['<?php echo lang('dom');?>', '<?php echo lang('lun');?>', '<?php echo lang('mar');?>', '<?php echo lang('mie');?>',
                '<?php echo lang('jue');?>', '<?php echo lang('vie');?>', '<?php echo lang('sab');?>', '<?php echo lang('dom');?>'],
            monthNames: ["<?php echo lang('enero');?>", "<?php echo lang('febrero');?>", "<?php echo lang('marzo');?>", "<?php echo lang('abril');?>",
                "<?php echo lang('mayo');?>", "<?php echo lang('junio');?>", "<?php echo lang('julio');?>", "<?php echo lang('agosto');?>",
                "<?php echo lang('septiembre');?>", "<?php echo lang('octubre');?>", "<?php echo lang('noviembre');?>", "<?php echo lang('diciembre');?>"],
            monthNamesShort: ["<?php echo lang('ene');?>", "<?php echo lang('feb');?>", "<?php echo lang('mar');?>", "<?php echo lang('abr');?>",
                "<?php echo lang('may');?>", "<?php echo lang('jun');?>", "<?php echo lang('jul');?>", "<?php echo lang('ago');?>",
                "<?php echo lang('sep');?>", "<?php echo lang('oct');?>", "<?php echo lang('nov');?>", "<?php echo lang('dic');?>"],                        
            events: <?php echo json_encode($info_reservas);?>
        });
    });
    
    function replaceAll( text, busca, reemplaza ){
        while (text.toString().indexOf(busca) != -1)
            text = text.toString().replace(busca,reemplaza);
        return text;
    }
    
    function setValuesStopSales(idreserva){
        if(confirm('<?php echo lang('confirm_stop_sales');?>')){
            var cadena = '<?php echo site_url().$this->uri->uri_string();?>';
            cadena = replaceAll(cadena, "/", "_");
            document.location.href = '<?php echo site_url('producto/eliminar_cierre/');?>'+'/'+idreserva+"/"+cadena;
        }
    }
</script>

<div id="jMonthCalendar"></div>		
<div style="color:red;"><b><?php echo $this->session->flashdata('message_cierre');?></b></div>